package com.weishu.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.weishu.domain.TSfContract;
import com.weishu.mapper.TSfContractMapper;
import com.weishu.service.ITSfContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liyan
 * @since 2021-07-31
 */
@Service
public class TSfContractServiceImpl extends ServiceImpl<TSfContractMapper, TSfContract> implements ITSfContractService {

    @Autowired
    private TSfContractMapper contractMapper;
    @Override
    public PageInfo<TSfContract> select(TSfContract sfContract) {
        PageHelper.startPage(sfContract.getPageNum(),sfContract.getPageSize());
        List<TSfContract> list=contractMapper.select(sfContract);
        return new PageInfo<>(list);
    }

    @Override
    public List<TSfContract> plist() {
        return contractMapper.plist();
    }

    @Override
    public TSfContract getBypid(Integer productId) {
        return contractMapper.getBypid(productId);
    }

    @Override
    public TSfContract getbalance(Integer id) {
        return contractMapper.getbalance(id);
    }

}
